home *** CD-ROM | disk | FTP | other *** search
/ Champak 114 / Vol 114.iso / games / beat_the.swf / scripts / frame_40 / DoAction.as
Encoding:
Text File  |  2010-08-12  |  17.7 KB  |  689 lines

  1. function point(x, y)
  2. {
  3.    this.x = x;
  4.    this.y = y;
  5. }
  6. function Forecourt()
  7. {
  8.    var _loc1_ = this;
  9.    _loc1_.openPumps = 0;
  10.    _loc1_.pSpaces = new Array(-1,-1,-1,-1,-1,-1);
  11.    _loc1_.pCars = new Array();
  12.    _loc1_.pTimer = 0;
  13.    _loc1_.pTimeGap = 160;
  14.    _loc1_.pCarCount = 1;
  15.    _loc1_.addPumps(2);
  16. }
  17. function Stelios(x, y, pos)
  18. {
  19.    var _loc1_ = this;
  20.    _loc1_.pPosX = x;
  21.    _loc1_.pPosY = y;
  22.    _loc1_.pSpeedX = 0;
  23.    _loc1_.pSpeedY = 0;
  24.    _loc1_.pDistCount = 0;
  25.    _loc1_.pSpeed = 10;
  26.    _loc1_.pDistX = 200 / _loc1_.pSpeed;
  27.    _loc1_.pDistY = 100 / _loc1_.pSpeed;
  28.    _loc1_.pPosition = pos;
  29.    _loc1_.pMoving = false;
  30.    _loc1_.pDodge = false;
  31.    _loc1_.pDodgeFlag = false;
  32.    _loc1_.p_mc = objects_mc.attachMovie("mc.stelios","stelios_mc",200);
  33.    _loc1_.p_mc._x = _loc1_.pPosX;
  34.    _loc1_.p_mc._y = _loc1_.pPosY;
  35. }
  36. function car(tNum, tSpace, tOwner)
  37. {
  38.    var _loc1_ = this;
  39.    var _loc2_ = tSpace;
  40.    var _loc3_ = tNum;
  41.    _loc1_.pLane = 1;
  42.    _loc1_.pSpace = _loc2_;
  43.    switch(_loc2_)
  44.    {
  45.       case 0:
  46.       case 1:
  47.       case 2:
  48.          _loc1_.pLane = 0;
  49.          break;
  50.       case 3:
  51.       case 4:
  52.       case 5:
  53.          _loc1_.pLane = 2;
  54.          _loc2_ -= 3;
  55.    }
  56.    _loc1_.pOwner = tOwner;
  57.    _loc1_.pId = _loc3_;
  58.    _loc1_.pPos = -50;
  59.    _loc1_.pSpeed = 0;
  60.    _loc1_.pMaxSpeed = 10;
  61.    _loc1_.pDestination = 160 + _loc2_ * 200;
  62.    _loc1_.pState = 0;
  63.    _loc1_.pAniState = "moving";
  64.    _loc1_.waitCount = 100;
  65.    _loc1_.p_mc = objects_mc.attachMovie("mc.car" + Math.round(1 + Math.random() * 4),"car" + _loc3_,5 + _loc1_.pLane * 100 + _loc3_);
  66.    _loc1_.p_mc._x = _loc1_.pPos;
  67.    _loc1_.p_mc._y = _loc1_.pLane * 72 + 197;
  68.    _loc1_.nextState();
  69. }
  70. Math.randomInt = function(aLo, aHi)
  71. {
  72.    return aLo + Math.round(Math.random() * (aHi - aLo));
  73. };
  74. point.prototype.rotate = function(tAngle)
  75. {
  76.    var _loc1_ = tAngle / 180 * 3.141592653589793;
  77.    var _loc2_ = [[Math.cos(_loc1_),Math.sin(_loc1_)],[- Math.sin(_loc1_),Math.cos(_loc1_)]];
  78.    var tX = this.x;
  79.    var _loc3_ = this.y;
  80.    this.x = tX * _loc2_[0][0] + _loc3_ * _loc2_[1][0];
  81.    this.y = tX * _loc2_[0][1] + _loc3_ * _loc2_[1][1];
  82. };
  83. point.prototype.randomDir = function(tCap)
  84. {
  85.    this.x *= Math.round(Math.random()) * 2 - 1;
  86.    this.y *= Math.round(Math.random()) * 2 - 1;
  87. };
  88. point.prototype.capLength = function(tCap)
  89. {
  90.    var _loc1_ = this;
  91.    var _loc3_ = tCap;
  92.    var _loc2_ = Math.sqrt(_loc1_.x * _loc1_.x + _loc1_.y * _loc1_.y);
  93.    if(_loc2_ > _loc3_)
  94.    {
  95.       _loc1_.x /= _loc2_;
  96.       _loc1_.y /= _loc2_;
  97.       _loc1_.x *= _loc3_;
  98.       _loc1_.y *= _loc3_;
  99.    }
  100. };
  101. Forecourt.prototype.addPumps = function(tOpen)
  102. {
  103.    var _loc1_ = this;
  104.    if(_loc1_.openPumps < tOpen)
  105.    {
  106.       switch(tOpen)
  107.       {
  108.          case 2:
  109.             _loc1_.pSpaces[2] = 0;
  110.             _loc1_.pSpaces[5] = 0;
  111.             pump3_mc.openPump();
  112.             pump6_mc.openPump();
  113.             _loc1_.openPumps += 2;
  114.             break;
  115.          case 3:
  116.             _loc1_.pSpaces[1] = 0;
  117.             pump2_mc.openPump();
  118.             _loc1_.openPumps += 1;
  119.             break;
  120.          case 4:
  121.             _loc1_.pSpaces[4] = 0;
  122.             pump5_mc.openPump();
  123.             _loc1_.openPumps += 1;
  124.             break;
  125.          case 5:
  126.             _loc1_.pSpaces[0] = 0;
  127.             pump1_mc.openPump();
  128.             _loc1_.openPumps += 1;
  129.             break;
  130.          case 6:
  131.             _loc1_.pSpaces[3] = 0;
  132.             pump4_mc.openPump();
  133.             _loc1_.openPumps += 1;
  134.       }
  135.    }
  136. };
  137. Forecourt.prototype.getOpenPump = function()
  138. {
  139.    var tFreePumps = new Array();
  140.    var _loc2_ = 0;
  141.    while(_loc2_ < 2)
  142.    {
  143.       var _loc1_ = 0;
  144.       while(_loc1_ < 3)
  145.       {
  146.          var _loc3_ = this.pSpaces[_loc2_ * 3 + _loc1_];
  147.          if(_loc3_ == 1)
  148.          {
  149.             break;
  150.          }
  151.          if(_loc3_ == 0)
  152.          {
  153.             tFreePumps[_loc2_] = _loc2_ * 3 + _loc1_;
  154.          }
  155.          _loc1_ = _loc1_ + 1;
  156.       }
  157.       _loc2_ = _loc2_ + 1;
  158.    }
  159.    if(tFreePumps[0] == undefined)
  160.    {
  161.       tFreePumps.splice(0,1);
  162.    }
  163.    else if(tFreePumps[1] == undefined)
  164.    {
  165.       tFreePumps.splice(1,1);
  166.    }
  167.    var tItem;
  168.    var tCount = tFreePumps.length;
  169.    if(tCount == 0)
  170.    {
  171.       return 6;
  172.    }
  173.    if(tCount == 1)
  174.    {
  175.       tItem = tFreePumps[0];
  176.    }
  177.    else
  178.    {
  179.       tItem = tFreePumps[Math.round(Math.random())];
  180.    }
  181.    this.pSpaces[tItem] = 1;
  182.    return tItem;
  183. };
  184. Forecourt.prototype.update = function()
  185. {
  186.    var _loc2_ = this;
  187.    var _loc3_ = _loc2_.pCars.length;
  188.    var _loc1_ = _loc3_ - 1;
  189.    while(_loc1_ > -1)
  190.    {
  191.       if(!_loc2_.pCars[_loc1_].update())
  192.       {
  193.          _loc2_.pCars[_loc1_].kill();
  194.          _loc2_.pCars.splice(_loc1_,1);
  195.       }
  196.       _loc1_ = _loc1_ - 1;
  197.    }
  198.    if(--_loc2_.pTimer <= 0)
  199.    {
  200.       _loc2_.pTimeGap = Math.max(_loc2_.pTimeGap - 5,100);
  201.       _loc2_.pTimer = Math.randomInt(0,24) + _loc2_.pTimeGap;
  202.       _loc2_.pCars.push(new car(_loc2_.pCarCount++,_loc2_.getOpenPump(),_loc2_));
  203.       if(_loc2_.pCarCount >= 50)
  204.       {
  205.          _loc2_.pCarCount = 1;
  206.       }
  207.       else if(_loc2_.pCarCount >= 26)
  208.       {
  209.          _loc2_.addPumps(6);
  210.       }
  211.       else if(_loc2_.pCarCount >= 17)
  212.       {
  213.          _loc2_.addPumps(5);
  214.       }
  215.       else if(_loc2_.pCarCount >= 11)
  216.       {
  217.          _loc2_.addPumps(4);
  218.       }
  219.       else if(_loc2_.pCarCount >= 4)
  220.       {
  221.          _loc2_.addPumps(3);
  222.       }
  223.    }
  224. };
  225. Forecourt.prototype.safeToMove = function(tLane, tPos)
  226. {
  227.    var _loc2_ = tPos;
  228.    var _loc3_ = undefined;
  229.    var _loc1_ = undefined;
  230.    for(_loc3_ in this.pCars)
  231.    {
  232.       _loc1_ = this.pCars[_loc3_];
  233.       if(_loc1_.checkLane(tLane))
  234.       {
  235.          _loc2_ = Math.min(_loc2_,_loc1_.getBumperPos(_loc2_));
  236.       }
  237.    }
  238.    return _loc2_;
  239. };
  240. Forecourt.prototype.leavingSpace = function(tSpace)
  241. {
  242.    this.pSpaces[tSpace] = 0;
  243. };
  244. Forecourt.prototype.pumpDone = function(tPumpNum)
  245. {
  246.    var _loc3_ = this;
  247.    var _loc2_ = _loc3_.pCars.length;
  248.    var _loc1_ = 0;
  249.    while(_loc1_ < _loc2_)
  250.    {
  251.       _loc3_.pCars[_loc1_].leavePump(tPumpNum);
  252.       _loc1_ = _loc1_ + 1;
  253.    }
  254. };
  255. Forecourt.prototype.pumpStarted = function(tPumpNum)
  256. {
  257.    var _loc3_ = this;
  258.    var _loc2_ = _loc3_.pCars.length;
  259.    var _loc1_ = 0;
  260.    while(_loc1_ < _loc2_)
  261.    {
  262.       _loc3_.pCars[_loc1_].fillingUp(tPumpNum);
  263.       _loc1_ = _loc1_ + 1;
  264.    }
  265. };
  266. Stelios.prototype.showLose = function()
  267. {
  268.    this.p_mc.gotoAndPlay("lose");
  269. };
  270. Stelios.prototype.flyAway = function()
  271. {
  272.    this.p_mc.gotoAndPlay("fly");
  273. };
  274. Stelios.prototype.showWin = function()
  275. {
  276.    this.p_mc.gotoAndPlay("wave");
  277. };
  278. Stelios.prototype.checkPos = function()
  279. {
  280.    var _loc1_ = this;
  281.    if(_loc1_.pPosition > 6)
  282.    {
  283.       return _loc1_.pPosition - 4;
  284.    }
  285.    if(_loc1_.pPosition < 4)
  286.    {
  287.       return _loc1_.pPosition - 1;
  288.    }
  289.    return -1;
  290. };
  291. Stelios.prototype.checkCar = function(tX, tY)
  292. {
  293.    var _loc1_ = this;
  294.    var _loc3_ = Math.ceil(_loc1_.pPosition / 3) - 1;
  295.    if(!_loc1_.pMoving)
  296.    {
  297.       if(_loc3_ != 1)
  298.       {
  299.          return false;
  300.       }
  301.    }
  302.    var tOffsetX = _loc1_.pPosX - tX;
  303.    var _loc2_ = _loc1_.pPosY - tY;
  304.    if(Math.abs(tOffsetX) < 70)
  305.    {
  306.       if(Math.abs(_loc2_) < 15)
  307.       {
  308.          if(_loc1_.pSpeedX + _loc1_.pSpeedY == 0)
  309.          {
  310.             _loc1_.pDodge = true;
  311.             if(_loc1_.pPosY == _loc1_.p_mc._y)
  312.             {
  313.                _loc1_.pDodgeFlag = true;
  314.                _loc1_.p_mc._y -= 40;
  315.                _loc1_.p_mc.swapDepths(100);
  316.                _loc1_.p_mc.gotoAndPlay("pauseDown");
  317.             }
  318.          }
  319.          else if(_loc1_.pSpeedX != 0)
  320.          {
  321.             _loc1_.pDodge = true;
  322.             if(_loc1_.pPosY == _loc1_.p_mc._y)
  323.             {
  324.                _loc1_.pDodgeFlag = true;
  325.                _loc1_.p_mc._y -= 40;
  326.                _loc1_.p_mc.swapDepths(100);
  327.                _loc1_.p_mc.gotoAndPlay("pauseDown");
  328.             }
  329.          }
  330.          else
  331.          {
  332.             _loc1_.pDodge = true;
  333.             if(_loc1_.pPosY == _loc1_.p_mc._y)
  334.             {
  335.                _loc1_.pDodgeFlag = true;
  336.                if(_loc1_.pSpeedY == 1)
  337.                {
  338.                   if(_loc2_ > 0)
  339.                   {
  340.                      _loc1_.p_mc._y += 40;
  341.                      _loc1_.pDistCount -= 4;
  342.                      if(_loc1_.pDistCount < 0)
  343.                      {
  344.                         _loc1_.pDistCount = 4;
  345.                         _loc1_.pSpeedY *= -1;
  346.                      }
  347.                      _loc1_.p_mc.gotoAndPlay("pauseUp");
  348.                      switch(_loc3_)
  349.                      {
  350.                         case 0:
  351.                            _loc1_.p_mc.swapDepths(100);
  352.                            break;
  353.                         case 1:
  354.                            _loc1_.p_mc.swapDepths(300);
  355.                      }
  356.                   }
  357.                   else
  358.                   {
  359.                      _loc1_.p_mc._y -= 40;
  360.                      _loc1_.pDistCount += 4;
  361.                      _loc1_.p_mc.gotoAndPlay("pauseDown");
  362.                   }
  363.                }
  364.                else if(_loc2_ > 0)
  365.                {
  366.                   _loc1_.p_mc._y += 40;
  367.                   _loc1_.pDistCount += 4;
  368.                   _loc1_.p_mc.gotoAndPlay("pauseUp");
  369.                }
  370.                else
  371.                {
  372.                   _loc1_.p_mc._y -= 40;
  373.                   _loc1_.pDistCount -= 4;
  374.                   _loc1_.p_mc.gotoAndPlay("pauseDown");
  375.                   switch(_loc3_)
  376.                   {
  377.                      case 1:
  378.                         _loc1_.p_mc.swapDepths(0);
  379.                         break;
  380.                      case 2:
  381.                         _loc1_.p_mc.swapDepths(200);
  382.                   }
  383.                }
  384.             }
  385.          }
  386.       }
  387.    }
  388. };
  389. Stelios.prototype.update = function()
  390. {
  391.    if(this.pDodge)
  392.    {
  393.       this.pDodge = false;
  394.    }
  395.    else
  396.    {
  397.       if(!this.pMoving)
  398.       {
  399.          this.pSpeedX = 0;
  400.          this.pSpeedY = 0;
  401.          if(Key.isDown(37))
  402.          {
  403.             if(this.pPosition == 5 || this.pPosition == 6)
  404.             {
  405.                this.pSpeedX = -1;
  406.                this.pDistCount = this.pDistX;
  407.                this.p_mc.gotoAndPlay("walkLeft");
  408.             }
  409.          }
  410.          else if(Key.isDown(39))
  411.          {
  412.             if(this.pPosition == 4 || this.pPosition == 5)
  413.             {
  414.                this.pSpeedX = 1;
  415.                this.pDistCount = this.pDistX;
  416.                this.p_mc.gotoAndPlay("walkRight");
  417.             }
  418.          }
  419.          else if(Key.isDown(38))
  420.          {
  421.             if(this.pPosition == 4 || this.pPosition == 5 || this.pPosition == 6 || this.pPosition == 7 || this.pPosition == 8 || this.pPosition == 9)
  422.             {
  423.                this.pSpeedY = -1;
  424.                this.pDistCount = this.pDistY;
  425.                this.p_mc.gotoAndPlay("walkUp");
  426.             }
  427.          }
  428.          else if(Key.isDown(40))
  429.          {
  430.             if(this.pPosition == 1 || this.pPosition == 2 || this.pPosition == 3 || this.pPosition == 4 || this.pPosition == 5 || this.pPosition == 6)
  431.             {
  432.                this.pSpeedY = 1;
  433.                this.pDistCount = this.pDistY;
  434.                this.p_mc.gotoAndPlay("walkDown");
  435.             }
  436.          }
  437.          if(this.pSpeedX + this.pSpeedY != 0)
  438.          {
  439.             if(this.pPosition > 6)
  440.             {
  441.                eval("pump" + (this.pPosition - 3) + "_mc").leftPump();
  442.             }
  443.             else if(this.pPosition < 4)
  444.             {
  445.                eval("pump" + this.pPosition + "_mc").leftPump();
  446.             }
  447.             this.pMoving = true;
  448.          }
  449.          else if(this.pDodgeFlag)
  450.          {
  451.             this.pDodgeFlag = false;
  452.             this.p_mc.gotoAndPlay("stand");
  453.          }
  454.       }
  455.       else
  456.       {
  457.          if(this.pDodgeFlag)
  458.          {
  459.             this.pDodgeFlag = false;
  460.             if(this.pSpeedY != 0)
  461.             {
  462.                this.pPosY = this.p_mc._y;
  463.             }
  464.             if(this.pSpeedX == -1)
  465.             {
  466.                this.p_mc.gotoAndPlay("walkLeft");
  467.             }
  468.             else if(this.pSpeedX == 1)
  469.             {
  470.                this.p_mc.gotoAndPlay("walkRight");
  471.             }
  472.             else if(this.pSpeedY == -1)
  473.             {
  474.                this.p_mc.gotoAndPlay("walkUp");
  475.             }
  476.             else
  477.             {
  478.                this.p_mc.gotoAndPlay("walkDown");
  479.             }
  480.          }
  481.          this.pMoving = --this.pDistCount > 0;
  482.          if(!this.pMoving)
  483.          {
  484.             this.p_mc.gotoAndPlay("stand");
  485.             if(this.pPosY > 320)
  486.             {
  487.                this.pSpeedY = 1;
  488.             }
  489.             this.pPosition += this.pSpeedX + this.pSpeedY * 3;
  490.             if(this.pPosition > 6)
  491.             {
  492.                eval("pump" + (this.pPosition - 3) + "_mc").checkPumpStelios();
  493.                this.p_mc.swapDepths(300);
  494.             }
  495.             else if(this.pPosition < 4)
  496.             {
  497.                eval("pump" + this.pPosition + "_mc").checkPumpStelios();
  498.                this.p_mc.swapDepths(0);
  499.             }
  500.             else
  501.             {
  502.                this.p_mc.swapDepths(200);
  503.             }
  504.             this.pSpeedX = 0;
  505.             this.pSpeedY = 0;
  506.          }
  507.       }
  508.       this.p_mc._x = this.pPosX += this.pSpeedX * this.pSpeed;
  509.       this.p_mc._y = this.pPosY += this.pSpeedY * this.pSpeed;
  510.    }
  511. };
  512. car.prototype.nextState = function()
  513. {
  514.    this.pState = this.pState + 1;
  515.    switch(this.pState)
  516.    {
  517.       case 1:
  518.          this.pAniState = "moving";
  519.          this.p_mc.gotoAndPlay(this.pAniState);
  520.          break;
  521.       case 2:
  522.          this.pAniState = "fuelling";
  523.          this.waitCount = 72;
  524.          this.p_mc.gotoAndPlay(this.pAniState);
  525.          eval("pump" + (this.pSpace + 1) + "_mc").checkPumpCar();
  526.          break;
  527.       case 3:
  528.          this.waitCount = 120;
  529.          eval("pump" + (this.pSpace + 1) + "_mc").angryCar();
  530.          break;
  531.       case 4:
  532.          break;
  533.       case 5:
  534.          eval("pump" + (this.pSpace + 1) + "_mc").leavingPump();
  535.          this.pAniState = "leave_happy";
  536.          this.p_mc.gotoAndPlay(this.pAniState);
  537.          break;
  538.       case 6:
  539.          this.kill();
  540.    }
  541. };
  542. car.prototype.update = function()
  543. {
  544.    var _loc1_ = this;
  545.    switch(_loc1_.pState)
  546.    {
  547.       case 0:
  548.          break;
  549.       case 1:
  550.          _loc1_.pSpeed = Math.min((_loc1_.pDestination - _loc1_.pPos) / 10,_loc1_.pMaxSpeed);
  551.          if(_loc1_.pSpeed < _loc1_.pMaxSpeed)
  552.          {
  553.             if(_loc1_.pAniState == "moving")
  554.             {
  555.                _loc1_.pAniState = "stopping";
  556.                _loc1_.p_mc.gotoAndPlay(_loc1_.pAniState);
  557.             }
  558.          }
  559.          if(_loc1_.pSpeed < 1)
  560.          {
  561.             _loc1_.nextState();
  562.          }
  563.          _loc1_.pPos += _loc1_.pSpeed;
  564.          var _loc2_ = _loc1_.pOwner.safeToMove(_loc1_.pLane,_loc1_.pPos);
  565.          if(_loc2_ != _loc1_.pPos)
  566.          {
  567.             _loc1_.pPos = _loc2_;
  568.          }
  569.          _loc1_.p_mc._x = _loc1_.pPos;
  570.          pStelios.checkCar(_loc1_.p_mc._x,_loc1_.p_mc._y);
  571.          if(_loc1_.pPos > 700)
  572.          {
  573.             _loc1_.kill();
  574.             return false;
  575.          }
  576.          break;
  577.       case 2:
  578.          _loc1_.waitCount = _loc0_ = _loc1_.waitCount - 1;
  579.          if(_loc0_ <= 0)
  580.          {
  581.             _loc1_.nextState();
  582.          }
  583.          break;
  584.       case 3:
  585.          _loc1_.waitCount = _loc0_ = _loc1_.waitCount - 1;
  586.          if(_loc0_ <= 0)
  587.          {
  588.             scores_mc.addpoints(-1000);
  589.             _loc1_.pOwner.leavingSpace(_loc1_.pSpace);
  590.             _loc1_.pState = 4;
  591.             _loc1_.nextState();
  592.          }
  593.          break;
  594.       case 4:
  595.          break;
  596.       case 5:
  597.          _loc1_.pSpeed = Math.min(10,_loc1_.pSpeed * 1.1);
  598.          _loc1_.pPos += _loc1_.pSpeed;
  599.          _loc2_ = _loc1_.pOwner.safeToMove(_loc1_.pLane,_loc1_.pPos);
  600.          if(_loc2_ != _loc1_.pPos)
  601.          {
  602.             _loc1_.pPos = _loc2_;
  603.          }
  604.          _loc1_.p_mc._x = _loc1_.pPos;
  605.          _loc1_.pSpace = 6;
  606.          if(_loc1_.pPos > 700)
  607.          {
  608.             return false;
  609.          }
  610.          break;
  611.    }
  612.    return true;
  613. };
  614. car.prototype.getBumperPos = function(tPos)
  615. {
  616.    if(tPos < this.pPos)
  617.    {
  618.       return this.pPos - 160;
  619.    }
  620.    return tPos;
  621. };
  622. car.prototype.leavePump = function(tPumpNum)
  623. {
  624.    var _loc1_ = this;
  625.    if(_loc1_.pState == 4)
  626.    {
  627.       if(tPumpNum == _loc1_.pSpace + 1)
  628.       {
  629.          scores_mc.addpoints(1000);
  630.          _loc1_.nextState();
  631.       }
  632.    }
  633. };
  634. car.prototype.fillingUp = function(tPumpNum)
  635. {
  636.    var _loc1_ = this;
  637.    if(tPumpNum == _loc1_.pSpace + 1)
  638.    {
  639.       if(_loc1_.pState == 2)
  640.       {
  641.          _loc1_.pState = 3;
  642.          _loc1_.nextState();
  643.       }
  644.       else if(_loc1_.pState == 3)
  645.       {
  646.          _loc1_.nextState();
  647.       }
  648.    }
  649. };
  650. car.prototype.checkLane = function(tLane)
  651. {
  652.    return tLane == this.pLane;
  653. };
  654. car.prototype.kill = function()
  655. {
  656.    var _loc1_ = this;
  657.    delete _loc1_.pId;
  658.    delete _loc1_.pPos;
  659.    delete _loc1_.pSpeed;
  660.    delete _loc1_.pMaxSpeed;
  661.    delete _loc1_.pDestination;
  662.    delete _loc1_.pState;
  663.    delete _loc1_.pAniState;
  664.    delete _loc1_.pOwner;
  665.    delete _loc1_.pSpace;
  666.    _loc1_.p_mc.removeMovieClip();
  667. };
  668. this.pLives = 3;
  669. this.lives_mc.setTo(this.pLives * 22);
  670. this.pForeCourt = new Forecourt();
  671. this.pStelios = new Stelios(455,260,6);
  672. this.gameOver = function()
  673. {
  674.    var _loc2_ = this;
  675.    var _loc1_ = 1;
  676.    while(_loc1_ < 7)
  677.    {
  678.       _loc2_["pump" + _loc1_ + "_mc"].gameover();
  679.       _loc1_ = _loc1_ + 1;
  680.    }
  681.    _loc2_.play();
  682. };
  683. this.onEnterFrame = function()
  684. {
  685.    this.pForeCourt.update();
  686.    this.pStelios.update();
  687. };
  688. stop();
  689.